package main

import (
	"fmt"
	"strings"
)

func main() {
	path := "\"D:\\Program\\Go\\src\\studygo\\day01\""
	fmt.Println(path)

	s := "i'm ok"
	fmt.Println(s)

	// 多行的字符串
	s3 := `
		世情薄
		人情恶
		雨送黄昏
	`
	fmt.Println(s3)

	fmt.Println(len(s3))

	// 字符串拼接
	name := "理想"
	world := "Ldd"
	ss := name + world
	fmt.Println(ss)
	fmt.Sprint("%s%s", name, world)

	fmt.Printf("%s%s", name, world)

	// 分割
	ret := strings.Split(path, "\\")
	fmt.Println(ret)

	// 包含
	fmt.Println(strings.Contains(s3, "理性"))

	// 前缀
	fmt.Println(strings.HasPrefix(s3, "理性"))

	//后缀
	fmt.Println(strings.HasSuffix(s3, "理性"))

	s4 := "abcde"
	fmt.Println(strings.Index(s4, "c"))
	fmt.Println(strings.LastIndex(s4, "d"))

	// 拼接
	fmt.Println(strings.Join(ret, "+"))

}
